<h1><%= @eaction.eapp.title %>: <%= @eaction.econtroller.title.titlecase %>#<%= @eaction.title %></h1>

<h2>Vital statistics</h2>
<table>
<tr><th>Type</th><th>min</th><th>q1</th><th>med</th><th>q3</th><th>max</th><th>avg</th><th>std</th></tr>
<% for times in {"Total time" => @times, "DB time" => @db_times, "Rendering time" => @rendering_times} %>
<tr><td><%= times[0] %></td><% statistics = times[1].summary %><td><%= statistics[:min].round_to(5) %></td><td><%= statistics[:q1].round_to(5) %></td><td><%= statistics[:med].round_to(5) %></td><td><%= statistics[:q3].round_to(5) %></td><td><%= statistics[:max].round_to(5) %></td><td><%= statistics[:avg].round_to(5) %></td><td><%= statistics[:std].round_to(5) %></td></tr>
<% end %>
</table>

<h2>Graph</h2>
<p><img src="/egraph/histogram_action/<%= @eaction.id %>" alt="Graph" /></p>

<h2>Recent requests</h2>
<% for erequest in @erequests %>
<h3><%= erequest.happened_at.strftime("%B %d, %Y at %I:%M%P") %>: <%= erequest.url %></h3>
<% for equery in erequest.equeries %>
<p><%= equery.query %></p>
<% end %>
<% end %>
<p><%= pagination_links(@erequest_pages, :window_size => 5) %></p>

<!---
<h2>Show or hide</h2>
<p><% if @eaction.visible==1 %>Currently visible. <%= link_to "Hide", {:visible => 0} %><% else %>Currently invisible. <%= link_to "Show", {:visible => 1} %><% end %> on main page</p>
--->
